﻿@model PagedList<LTSMZ.life.Model.SecondType>
           @using Webdiyer.WebControls.Mvc

@{
    ViewBag.Title = "SecondTypeShow";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="~/Content/BootstrapSouce/css/bootstrap.min.css" rel="stylesheet" />
<script src="~/Content/BootstrapSouce/js/jquery.min.js"></script>
<script src="~/Content/BootstrapSouce/js/bootstrap.min.js"></script>

<button class="btn btn-lg btn-info" onclick="Add()"><span class="glyphicon glyphicon-plus">添加</span></button>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">
            二级类别列表
        </h3>
    </div>
    <div class="panel-body">
        <table class="table table-hover table-bordered" id="table1">
            <tr>
                <td>第二类别编号</td>
                <td>第二类别名称</td>
                <td>第一类别名称</td>
                <td>操作</td>
            </tr>
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.Sid</td>
                    <td>@item.Sname</td>
                    <td>@item.Fname</td>
                    <td><a href="/Home/DelSecondType/@item.Sid" onclick="return confirm('确定要删除吗？')" class="glyphicon glyphicon-trash"></a></td>
                </tr>
            }
        </table>
    </div>
</div>

@Html.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex" })
<script>
    function Add() {
        location.href = '/Home/AddSecond'
    }
</script>
